package io_0929;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

/**
 * Created with IntelliJ IDEA.
 * Description: 使用字符流 Reader读文件
 * User: 86187
 * Date: 2022-10-07
 * Time: 21:39
 */
public class Demo2 {
    public static void main(String[] args) throws IOException {
        Reader reader = new FileReader("./bbb.txt");

        while(true) {
            int b = reader.read();
            if(b == -1) {
                break;
            }
            char ch = (char)b;
            System.out.println(ch);
        }
    }
}
